using UnityEngine;
using UnityEngine.UI;

public class EE_UI_Upgrade : MonoBehaviour
{
    private static EE_UI_Upgrade instance = null; public static EE_UI_Upgrade Instance {get{return instance;}}
    
    [HideInInspector] public GameObject elements = null;
    
    private Button buttonClose = null;
    private Button buttonConfirm = null;
    private void Awake()
    {
        instance = this;
        elements = transform.GetChild(0).gameObject;
        buttonClose = elements.transform.GetChild(0).GetComponent<Button>();
        buttonConfirm = elements.transform.GetChild(1).GetComponent<Button>();
        elements.SetActive(false);
    }

    private void Start()
    {
        buttonClose.onClick.AddListener(Close);
        buttonConfirm.onClick.AddListener(Confirm);
    }

    private void Confirm()
    {
        Debug.Log("建筑开始升级");
    }

    private void Close()
    {
        elements.SetActive(false);
    }
}